---
title: Edge
description: A template designed to report observed communication edges between workloads.
location: https://istio.io/docs/reference/config/policy-and-telemetry/templates/edge.html
layout: protoc-gen-docs
generator: protoc-gen-docs
number_of_entries: 1
---
<p>The <code>edge</code> template represents an edge in the mesh graph.</p>

<h2 id="Template">Template</h2>
<section>
<p>The <code>edge</code> template represents an edge in the mesh graph</p>

<p>When writing the configuration, the value for the fields associated
with this template can either be a literal or an
<a href="https://istio.io/docs/reference/config/policy-and-telemetry/expression-language/">expression</a>. Please
note that if the datatype of a field is not
istio.mixer.adapter.model.v1beta1.Value, then the expression&rsquo;s
<a href="https://istio.io/docs/reference/config/policy-and-telemetry/expression-language/#type-checking">inferred type</a>
must match the datatype of the field.</p>

<p>Example config:</p>

<pre><code class="language-yaml">apiVersion: &quot;config.istio.io/v1alpha2&quot;
kind: instance
metadata:
  name: default
  namespace: istio-system
spec:
  compiledTemplate: edge
  params:
    timestamp: request.time
    sourceUid: source.uid | &quot;Unknown&quot;
    sourceOwner: source.owner | &quot;Unknown&quot;
    sourceWorkloadName: source.workload.name | &quot;Unknown&quot;
    sourceWorkloadNamespace: source.workload.namespace | &quot;Unknown&quot;
    destinationUid: destination.uid | &quot;Unknown&quot;
    destinationOwner: destination.owner | &quot;Unknown&quot;
    destinationWorkloadName: destination.workload.name | &quot;Unknown&quot;
    destinationWorkloadNamespace: destination.workload.namespace | &quot;Unknown&quot;
    destinationServiceName: destination.service.name | &quot;Unknown&quot;
    destinationServiceNamespace: destination.service.namespace | &quot;Unknown&quot;
    apiProtocol: api.protocol | &quot;Unknown&quot;
    contextProtocol: context.protocol | &quot;Unknown&quot;
</code></pre>

<table class="message-fields">
<thead>
<tr>
<th>Field</th>
<th>Type</th>
<th>Description</th>
<th>Required</th>
</tr>
</thead>
<tbody>
<tr id="Template-timestamp">
<td><code>timestamp</code></td>
<td><code><a href="https://istio.io/docs/reference/config/policy-and-telemetry/istio.policy.v1beta1.html#TimeStamp">TimeStamp</a></code></td>
<td>
<p>Timestamp of the edge</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-source_workload_namespace">
<td><code>sourceWorkloadNamespace</code></td>
<td><code>string</code></td>
<td>
<p>Namespace of the source workload</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-source_workload_name">
<td><code>sourceWorkloadName</code></td>
<td><code>string</code></td>
<td>
<p>Name of the source workload</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-source_owner">
<td><code>sourceOwner</code></td>
<td><code>string</code></td>
<td>
<p>Owner of the source workload (often k8s deployment)</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-source_uid">
<td><code>sourceUid</code></td>
<td><code>string</code></td>
<td>
<p>UID of the source workload</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-destination_workload_namespace">
<td><code>destinationWorkloadNamespace</code></td>
<td><code>string</code></td>
<td>
<p>Namespace of the destination workload</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-destination_workload_name">
<td><code>destinationWorkloadName</code></td>
<td><code>string</code></td>
<td>
<p>Name of the destination workload</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-destination_owner">
<td><code>destinationOwner</code></td>
<td><code>string</code></td>
<td>
<p>Owner of the destination workload (often k8s deployment)</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-destination_uid">
<td><code>destinationUid</code></td>
<td><code>string</code></td>
<td>
<p>UID of the destination workload</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-destination_service_namespace">
<td><code>destinationServiceNamespace</code></td>
<td><code>string</code></td>
<td>
<p>Namespace of the destination Service</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-destination_service_name">
<td><code>destinationServiceName</code></td>
<td><code>string</code></td>
<td>
<p>Name of the destination Service</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-context_protocol">
<td><code>contextProtocol</code></td>
<td><code>string</code></td>
<td>
<p>Protocol used for communication (http, tcp)</p>

</td>
<td>
No
</td>
</tr>
<tr id="Template-api_protocol">
<td><code>apiProtocol</code></td>
<td><code>string</code></td>
<td>
<p>The protocol type of the API call (http, https, grpc)</p>

</td>
<td>
No
</td>
</tr>
</tbody>
</table>
</section>
